"""
Research Core Package
核心研究模块包
"""

from .workflow import create_workflow
# 从增强版多代理工作流导入所需类
from .enhanced_multi_agent_workflow import create_enhanced_multi_agent_workflow as create_multi_agent_workflow, EnhancedMultiAgentState as MultiAgentState
from .state import AgentState
from .nodes import (
    generate_search_query,
    execute_web_search,
    evaluate_results,
    generate_final_answer,
    should_continue
)
from .prompts import (
    SEARCH_PROMPT,
    REFLECTION_PROMPT,
    FINAL_ANSWER_PROMPT,
    SEARCH_STRATEGIST_PROMPT,
    ANALYST_PROMPT,
    WRITER_PROMPT,
    COORDINATOR_PROMPT
)
from .model import get_llm, get_llm_with_config
from .workflow_manager import workflow_manager, get_workflow_manager
from .workflow_registry import workflow_registry, get_workflow_registry
from .workflow_pool import global_workflow_pool, initialize_workflow_pool, shutdown_workflow_pool
from .workflow_orchestrator import workflow_orchestrator, get_workflow_orchestrator

# 导出提示词工程相关模块
from .prompt_eng_state import PromptEngineeringState
from .prompt_eng_workflow import (
    create_prompt_engineering_workflow_with_feedback,
    create_simple_prompt_workflow_with_feedback,
    create_advanced_prompt_workflow
)
from .interactive_prompt_eng import (
    InteractivePromptEngineering,
    PromptHistoryManager,
    InteractiveFeedbackCollector
)
from .ab_testing import (
    ABTester,
    compare_prompt_versions
)
from .ml_prompt_evaluator import (
    MLPromptEvaluator,
    create_ml_evaluator_with_examples
)
# 添加对advanced_evaluate_prompt_quality函数的导入
from .prompt_eng_agents import advanced_evaluate_prompt_quality
# 添加对ExplainablePromptEngineering类的导入
from .explainable_prompt_eng import ExplainablePromptEngineering

# 修复：从 prompt_eng_agents 模块导入缺失的函数
from .prompt_eng_agents import (
    ab_test_prompts,
    collect_user_feedback,
    auto_optimize_prompt,
    test_prompt_in_production
)

__all__ = [
    "workflow_manager",
    "get_workflow_manager",
    "workflow_registry", 
    "get_workflow_registry",
    "global_workflow_pool",
    "initialize_workflow_pool",
    "shutdown_workflow_pool",
    "workflow_orchestrator",
    "get_workflow_orchestrator",
    "create_prompt_engineering_workflow_with_feedback",
    "create_simple_prompt_workflow_with_feedback",
    "create_advanced_prompt_workflow",
    "PromptEngineeringState",
    "ab_test_prompts",
    "collect_user_feedback",
    "auto_optimize_prompt",
    "test_prompt_in_production",
    "advanced_evaluate_prompt_quality",
    "ExplainablePromptEngineering"
]